<!DOCTYPE html>
<html lang="en">

<head>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        body{
            font-size: 13px;
        }
        #box{
            width: 200px;
            margin: 100px auto;
        }
        .p{

            margin-top: 10px;
            display: none;
        }
        .hover{
            border: 1px solid #ff9900;
            padding: 5px;
            background-color: #ffefa4;
            display: block;
        }
    </style>
</head>

<body>
    <div id="box">
        <p id="btn"><input type="checkbox">两周内自动登录</p>
        <p class="p">为了您的信息安全，请不要在网吧或公用电脑使用此功能！</p>
    </div>
</body>
<script>
    let arr=document.getElementById('box')


    arr.children[0].onmouseover=function(){
        // console.log(1);
        arr.children[1].className = "hover"
    }


    arr.children[0].onmouseout=function(){
        // console.log(2);
        arr.children[1].className = "p"
    }



    
</script>

</html>